home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / imglist.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  8.9 KB  |  216 lines

  1. // Borland C++ Builder
  2. // Copyright (c) 1995, 1998 by Borland International
  3. // All rights reserved
  4.  
  5. // (DO NOT EDIT: machine generated header) 'Imglist.pas' rev: 3.00
  6.  
  7. #ifndef ImglistHPP
  8. #define ImglistHPP
  9. #include <ToolWin.hpp>
  10. #include <ComCtrls.hpp>
  11. #include <ExtDlgs.hpp>
  12. #include <Dialogs.hpp>
  13. #include <Classes.hpp>
  14. #include <Controls.hpp>
  15. #include <ExtCtrls.hpp>
  16. #include <StdCtrls.hpp>
  17. #include <Forms.hpp>
  18. #include <Graphics.hpp>
  19. #include <SysUtils.hpp>
  20. #include <Messages.hpp>
  21. #include <Windows.hpp>
  22. #include <SysInit.hpp>
  23. #include <System.hpp>
  24.  
  25. //-- user supplied -----------------------------------------------------------
  26.  
  27. namespace Imglist
  28. {
  29. //-- type declarations -------------------------------------------------------
  30. enum TImageOperation { ioCrop, ioStretch, ioCenter };
  31.  
  32. class DELPHICLASS TImageInfo;
  33. class DELPHICLASS TImageListEditor;
  34. class PASCALIMPLEMENTATION TImageListEditor : public Forms::TForm 
  35. {
  36.     typedef Forms::TForm inherited;
  37.     
  38. __published:
  39.     Stdctrls::TButton* OK;
  40.     Stdctrls::TButton* Cancel;
  41.     Stdctrls::TGroupBox* ImageGroup;
  42.     Extctrls::TPanel* MainPanel;
  43.     Extctrls::TImage* MainImage;
  44.     Extdlgs::TOpenPictureDialog* OpenDialog;
  45.     Extctrls::TRadioGroup* OptionsGroup;
  46.     Stdctrls::TButton* Apply;
  47.     Stdctrls::TComboBox* TransparentColor;
  48.     Stdctrls::TLabel* TransparentLabel;
  49.     Stdctrls::TLabel* FillLabel;
  50.     Stdctrls::TComboBox* FillColor;
  51.     Stdctrls::TButton* Help;
  52.     Stdctrls::TGroupBox* GroupBox1;
  53.     Comctrls::TListView* ImageView;
  54.     Stdctrls::TButton* Add;
  55.     Stdctrls::TButton* Delete;
  56.     Stdctrls::TButton* Clear;
  57.     Stdctrls::TEdit* Edit1;
  58.     Stdctrls::TLabel* Label1;
  59.     Stdctrls::TEdit* Edit2;
  60.     Stdctrls::TLabel* Label2;
  61.     Extctrls::TTimer* Timer1;
  62.     void __fastcall AddClick(System::TObject* Sender);
  63.     void __fastcall DeleteClick(System::TObject* Sender);
  64.     void __fastcall ClearClick(System::TObject* Sender);
  65.     void __fastcall FormCreate(System::TObject* Sender);
  66.     void __fastcall FormDestroy(System::TObject* Sender);
  67.     void __fastcall OptionsGroupClick(System::TObject* Sender);
  68.     void __fastcall ApplyClick(System::TObject* Sender);
  69.     void __fastcall TransparentColorChange(System::TObject* Sender);
  70.     void __fastcall FillColorChange(System::TObject* Sender);
  71.     void __fastcall TransparentColorExit(System::TObject* Sender);
  72.     void __fastcall FillColorExit(System::TObject* Sender);
  73.     void __fastcall ImageViewChange(System::TObject* Sender, Comctrls::TListItem* Item, Comctrls::TItemChange 
  74.         Change);
  75.     void __fastcall ImageViewEdited(System::TObject* Sender, Comctrls::TListItem* Item, System::AnsiString 
  76.         &S);
  77.     void __fastcall ImageViewKeyDown(System::TObject* Sender, Word &Key, Classes::TShiftState Shift);
  78.     void __fastcall ImageViewDragDrop(System::TObject* Sender, System::TObject* Source, int X, int Y);
  79.     void __fastcall ImageViewDragOver(System::TObject* Sender, System::TObject* Source, int X, int Y, Controls::TDragState 
  80.         State, bool &Accept);
  81.     void __fastcall HelpClick(System::TObject* Sender);
  82.     void __fastcall MainImageMouseMove(System::TObject* Sender, Classes::TShiftState Shift, int X, int 
  83.         Y);
  84.     void __fastcall MainImageMouseDown(System::TObject* Sender, Controls::TMouseButton Button, Classes::TShiftState 
  85.         Shift, int X, int Y);
  86.     void __fastcall MainImageMouseUp(System::TObject* Sender, Controls::TMouseButton Button, Classes::TShiftState 
  87.         Shift, int X, int Y);
  88.     void __fastcall Timer1Timer(System::TObject* Sender);
  89.     void __fastcall ImageViewEndDrag(System::TObject* Sender, System::TObject* Target, int X, int Y);
  90.     
  91. private:
  92.     bool FChanging;
  93.     bool FSelecting;
  94.     Controls::TImageList* FComponentList;
  95.     Classes::TList* FInfoList;
  96.     Controls::TImageList* FImageList;
  97.     Controls::TImageList* FImageListView;
  98.     Graphics::TBitmap* FImageBitmap;
  99.     Controls::TImageList* FDragImageList;
  100.     bool FOldMasked;
  101.     Graphics::TColor FOldBkColor;
  102.     Graphics::TColor FOldBlendColor;
  103.     TDrawingStyle FOldDrawingStyle;
  104.     TImageType FOldImageType;
  105.     bool FPickingColor;
  106.     void __fastcall AddColor(const System::AnsiString S);
  107.     void __fastcall ClearBitmap(Graphics::TBitmap* Value, Graphics::TColor Color);
  108.     void __fastcall ClearAllImages(void);
  109.     void __fastcall ClearWithFill(Graphics::TBitmap* Bitmap, int Index);
  110.     void __fastcall DeleteSelectedImages(void);
  111.     void __fastcall FocusImage(int Index, int Count);
  112.     TImageInfo* __fastcall GetImageInfo(int Index);
  113.     int __fastcall GetIndex(void);
  114.     void __fastcall MoveImage(int FromIndex, int ToIndex);
  115.     void __fastcall Replace(int Index, Graphics::TBitmap* Image, Graphics::TBitmap* Mask);
  116.     void __fastcall ReplaceMasked(int Index, Graphics::TBitmap* NewImage, Graphics::TColor MaskColor);
  117.     void __fastcall SetImageFillColor(Graphics::TColor Color);
  118.     void __fastcall SetImageOperation(TImageOperation Operation);
  119.     void __fastcall SetImageTransparentColor(Graphics::TColor Color);
  120.     bool __fastcall SetStates(void);
  121.     void __fastcall StretchImageList(Controls::TImageList* SrcList, Controls::TImageList* DstList, int 
  122.         Width, int Height);
  123.     void __fastcall CenterImageList(Controls::TImageList* SrcList, Controls::TImageList* DstList, int Width
  124.         , int Height);
  125.     void __fastcall UpdateImageView(void);
  126.     void __fastcall StretchReplace(Controls::TImageList* List, int Index, Graphics::TBitmap* Image, Graphics::TBitmap* 
  127.         Mask);
  128.     void __fastcall StretchReplaceMasked(Controls::TImageList* List, int Index, Graphics::TBitmap* Image
  129.         , Graphics::TColor MaskColor);
  130.     void __fastcall CenterReplace(Controls::TImageList* List, int Index, Graphics::TBitmap* Image, Graphics::TBitmap* 
  131.         Mask);
  132.     void __fastcall CenterReplaceMasked(Controls::TImageList* List, int Index, Graphics::TBitmap* Image
  133.         , Graphics::TColor MaskColor);
  134.     void __fastcall DoImageListViewChange(System::TObject* Sender);
  135.     void __fastcall UpdatePickColor(int X, int Y);
  136.     
  137. public:
  138.     void __fastcall AddBitmap(void);
  139.     void __fastcall Center(int Index);
  140.     void __fastcall Crop(int Index);
  141.     void __fastcall SelectImage(int Index);
  142.     void __fastcall Stretch(int Index);
  143.     __property Controls::TImageList* DragImageList = {read=FDragImageList, write=FDragImageList};
  144.     __property Graphics::TBitmap* ImageBitmap = {read=FImageBitmap};
  145.     __property int Index = {read=GetIndex, nodefault};
  146.     __property Classes::TList* InfoList = {read=FInfoList};
  147.     __property Controls::TImageList* ImageList = {read=FImageList};
  148.     __property Controls::TImageList* ImageListView = {read=FImageListView};
  149.     __property TImageInfo* Items[int Index] = {read=GetImageInfo};
  150.     __property Controls::TImageList* ComponentList = {read=FComponentList};
  151. public:
  152.     /* TCustomForm.Create */ __fastcall virtual TImageListEditor(Classes::TComponent* AOwner) : Forms::
  153.         TForm(AOwner) { }
  154.     /* TCustomForm.CreateNew */ __fastcall TImageListEditor(Classes::TComponent* AOwner, int Dummy) : Forms::
  155.         TForm(AOwner, Dummy) { }
  156.     /* TCustomForm.Destroy */ __fastcall virtual ~TImageListEditor(void) { }
  157.     
  158. public:
  159.     /* TWinControl.CreateParented */ __fastcall TImageListEditor(HWND ParentWindow) : Forms::TForm(ParentWindow
  160.         ) { }
  161.     
  162. };
  163.  
  164. class PASCALIMPLEMENTATION TImageInfo : public System::TObject 
  165. {
  166.     typedef System::TObject inherited;
  167.     
  168. private:
  169.     bool FAutoOp;
  170.     TImageOperation FOperation;
  171.     Classes::TList* FOwner;
  172.     TImageListEditor* FOwnerForm;
  173.     bool FCanChangeTransparent;
  174.     bool FCanChangeFill;
  175.     Graphics::TBitmap* FBitmap;
  176.     Graphics::TBitmap* FMask;
  177.     bool FNew;
  178.     Graphics::TColor FTransparentColor;
  179.     Graphics::TColor FFillColor;
  180.     void __fastcall Center(void);
  181.     void __fastcall Crop(void);
  182.     int __fastcall GetIndex(void);
  183.     void __fastcall SetOperation(TImageOperation Value);
  184.     void __fastcall SetFillColor(Graphics::TColor Value);
  185.     void __fastcall SetTransparentColor(Graphics::TColor Value);
  186.     void __fastcall Stretch(void);
  187.     
  188. public:
  189.     __fastcall TImageInfo(Classes::TList* AOwner, TImageListEditor* AOwnerForm);
  190.     __fastcall virtual ~TImageInfo(void);
  191.     void __fastcall Change(void);
  192.     void __fastcall SelectImage(void);
  193.     __property Graphics::TBitmap* Bitmap = {read=FBitmap};
  194.     __property Graphics::TBitmap* Mask = {read=FMask};
  195.     __property bool New = {read=FNew, nodefault};
  196.     __property bool CanChangeFill = {read=FCanChangeFill, nodefault};
  197.     __property bool CanChangeTransparent = {read=FCanChangeTransparent, nodefault};
  198.     __property Graphics::TColor FillColor = {read=FFillColor, write=SetFillColor, nodefault};
  199.     __property int Index = {read=GetIndex, nodefault};
  200.     __property TImageOperation Operation = {read=FOperation, write=SetOperation, nodefault};
  201.     __property Classes::TList* Owner = {read=FOwner};
  202.     __property TImageListEditor* OwnerForm = {read=FOwnerForm};
  203.     __property Graphics::TColor TransparentColor = {read=FTransparentColor, write=SetTransparentColor, 
  204.         nodefault};
  205. };
  206.  
  207. //-- var, const, procedure ---------------------------------------------------
  208. extern PACKAGE bool __fastcall EditImageList(Controls::TImageList* AImageList);
  209.  
  210. }    /* namespace Imglist */
  211. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  212. using namespace Imglist;
  213. #endif
  214. //-- end unit ----------------------------------------------------------------
  215. #endif    // Imglist
  216.